package com.zhang.framelib.util;

import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * 设置Spring上下文（获取Spring容器）
 * Title:SpringApplicationContextUtil
 * Description:
 * @Edit_Description:cuishuaiming
 * @version:zhang-framelib 1.0
 */
public class SpringApplicationContextUtil implements ApplicationContextAware{

	private static ApplicationContext context = null;
	
	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		context = applicationContext;
		
	}
	
	public static ApplicationContext getContext(){
		return context;
	}

}
